#ifndef __GLOBALMESSAGE_H_
#define __GLOBALMESSAGE_H_


#include <stdbool.h>

#define NameSize 32
#define ConSize 800
#define pathSize 512

typedef enum
{
    login,//登陆
    chat, //私聊
    allchat, //群聊
    sendFile, //发文件
    FileStart,
}Func;


//客户端信息
struct ClientInfo
{
    char account[NameSize];
    int sock;
};
typedef struct ClientInfo CInfo;

CInfo* CreateClientInfo(const char *account,int sock);
void ClearClientInfo(void *c);
bool IsNameEqual(void *ptr1,void *ptr2);


//全局消息结构体
typedef struct GlobalMessage
{
    char fromName[NameSize]; //发消息的人
    char toName[NameSize];  //收消息的人
    char content[ConSize]; //消息内容
    char pathName[pathSize];
    Func flag;            //功能选择
}GLMSG;



#endif